$(function() {

    $('#slider1').s3Slider({
        timeOut: 4000
    });

	$(".linkAnimate").hover(function(){
		var e = this;
		$(e).animate({
			opacity: 0.4
		}, 300 );
	},function(){
		var e = this;
		$(e).animate({
			opacity: 1
		}, 300 );
    });

	$("#dialogConnection").dialog({
		bgiframe: true,
		autoOpen: false,
		draggable: false,
		height: 225,
		modal: true,
		resizable: false,
		buttons: {
			'Annuler': function() {
				$(this).dialog('close');
			},
			'Connection': function() {
				connection();
			}
		},
		close: function() {
			/*allFields.val('').removeClass('ui-state-error');*/
		}
	});
});

function connect(){
	$('#dialogConnection').dialog('open');
}

function connection(){
	var email = $('#emailConnection').val();
	var mdp = $('#mdpConnection').val();
	alert(email);
	alert(mdp);
}